package com.lk.controller;

import com.lk.remote.OrderRemoteFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : com.com.lk
 * @date 2021/11/21 12:14
 **/
@RestController
public class HelloController {


    @GetMapping("/product/{productId}")
    public String getProductName(@PathVariable Integer productId) {
        return "IPhone 12";
    }

    @Autowired
    private OrderRemoteFeign orderRemoteFeign;

    @GetMapping("success")
    public String success() {
        return orderRemoteFeign.test();
    }

}
